GET VERTEXDATA U
This command will return a float representing the V-Data value of the locked vertexdata.
Return Float=GET VERTEXDATA U(Vertex Index)
Return Float=GET VERTEXDATA U(Vertex Index, Stage Number)
Vertex Index
Integer
This value is an integer number such as 1.
Stage Number
Integer
This value is an integer number such as 1.
This value is a float number such as 0.5
This typically is used to specify the vertical position of where the vertex grabs its texel from the associated texture, usually between 0.0 and 1.0. An optional Stage Number can be used to access UV data in secondary stages of the vertexdata.
rem Create simple plain and read its 4 vertices (plus any indices)
if get maximum vertex shader version()>0
make object plain 1,100,100
lock vertexdata for limb 1,0
vmax=get vertexdata vertex count()
for v=0 to vmax-1
x#=get vertexdata position x(v)
y#=get vertexdata position y(v)
z#=get vertexdata position z(v)
nx#=get vertexdata normals x(v)
ny#=get vertexdata normals y(v)
nz#=get vertexdata normals z(v)
diffuse=get vertexdata diffuse(v)
u#=get vertexdata u(v)
v#=get vertexdata v(v)
next v
imax=get vertexdata index count()
for i=0 to imax-1
vertindex=get indexdata(i)
next i
unlock vertexdata
endif
BASIC3D Commands Menu
Index